
#include <windows.h>
#include "view/Janela.h"

extern void iniciar();

HINSTANCE g_hInstance = GetModuleHandle(NULL);


#ifdef _MSC_VER

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    LPSTR pszCmdLine, int iCmdShow)
{
	g_hInstance = hInstance;

	iniciar();

    return Janela::LoopDeMensagens();
}

#else

DWORD WINAPI Thread_Iniciar(LPVOID lpParam)
{
    iniciar();
}

int main()
{
    DWORD thId;
    HANDLE hThread = CreateThread(NULL, 0, Thread_Iniciar, NULL, 0, &thId);
    printf("aqui\n");

    return Janela::LoopDeMensagens();
}

#endif
